
/**
 * This is a generated class and is not intended for modification.  
 */
package com.model.valueObjects
{
import com.adobe.fiber.styles.IStyle;
import com.adobe.fiber.styles.Style;
import com.adobe.fiber.styles.StyleValidator;
import com.adobe.fiber.valueobjects.AbstractEntityMetadata;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import mx.events.ValidationResultEvent;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IModelType;
import mx.events.PropertyChangeEvent;

use namespace model_internal;

[ExcludeClass]
internal class _VOUserMasterEntityMetadata extends com.adobe.fiber.valueobjects.AbstractEntityMetadata
{
    private static var emptyArray:Array = new Array();

    model_internal static var allProperties:Array = new Array("contactaddress1", "contactaddress2", "address1", "lastname", "address2", "password", "p_code", "city", "title", "username", "faxno", "locationid", "orgname", "description", "client_id", "user_type", "contactno_1", "firstname", "contactno_2", "country", "ext1", "contactname", "ext2", "dbname", "active");
    model_internal static var allAssociationProperties:Array = new Array();
    model_internal static var allRequiredProperties:Array = new Array("contactaddress1", "contactaddress2", "address1", "lastname", "address2", "password", "p_code", "city", "title", "username", "faxno", "locationid", "orgname", "description", "client_id", "user_type", "contactno_1", "firstname", "contactno_2", "country", "ext1", "contactname", "ext2", "dbname", "active");
    model_internal static var allAlwaysAvailableProperties:Array = new Array("contactaddress1", "contactaddress2", "address1", "lastname", "address2", "password", "p_code", "city", "title", "username", "faxno", "locationid", "orgname", "description", "client_id", "user_type", "contactno_1", "firstname", "contactno_2", "country", "ext1", "contactname", "ext2", "dbname", "active");
    model_internal static var guardedProperties:Array = new Array();
    model_internal static var dataProperties:Array = new Array("contactaddress1", "contactaddress2", "address1", "lastname", "address2", "password", "p_code", "city", "title", "username", "faxno", "locationid", "orgname", "description", "client_id", "user_type", "contactno_1", "firstname", "contactno_2", "country", "ext1", "contactname", "ext2", "dbname", "active");
    model_internal static var derivedProperties:Array = new Array();
    model_internal static var collectionProperties:Array = new Array();
    model_internal static var collectionBaseMap:Object;
    model_internal static var entityName:String = "VOUserMaster";
    model_internal static var dependentsOnMap:Object;
    model_internal static var dependedOnServices:Array = new Array();

    
    model_internal var _contactaddress1IsValid:Boolean;
    model_internal var _contactaddress1Validator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _contactaddress1IsValidCacheInitialized:Boolean = false;
    model_internal var _contactaddress1ValidationFailureMessages:Array;
    
    model_internal var _contactaddress2IsValid:Boolean;
    model_internal var _contactaddress2Validator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _contactaddress2IsValidCacheInitialized:Boolean = false;
    model_internal var _contactaddress2ValidationFailureMessages:Array;
    
    model_internal var _address1IsValid:Boolean;
    model_internal var _address1Validator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _address1IsValidCacheInitialized:Boolean = false;
    model_internal var _address1ValidationFailureMessages:Array;
    
    model_internal var _lastnameIsValid:Boolean;
    model_internal var _lastnameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _lastnameIsValidCacheInitialized:Boolean = false;
    model_internal var _lastnameValidationFailureMessages:Array;
    
    model_internal var _address2IsValid:Boolean;
    model_internal var _address2Validator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _address2IsValidCacheInitialized:Boolean = false;
    model_internal var _address2ValidationFailureMessages:Array;
    
    model_internal var _passwordIsValid:Boolean;
    model_internal var _passwordValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _passwordIsValidCacheInitialized:Boolean = false;
    model_internal var _passwordValidationFailureMessages:Array;
    
    model_internal var _p_codeIsValid:Boolean;
    model_internal var _p_codeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _p_codeIsValidCacheInitialized:Boolean = false;
    model_internal var _p_codeValidationFailureMessages:Array;
    
    model_internal var _cityIsValid:Boolean;
    model_internal var _cityValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _cityIsValidCacheInitialized:Boolean = false;
    model_internal var _cityValidationFailureMessages:Array;
    
    model_internal var _titleIsValid:Boolean;
    model_internal var _titleValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _titleIsValidCacheInitialized:Boolean = false;
    model_internal var _titleValidationFailureMessages:Array;
    
    model_internal var _usernameIsValid:Boolean;
    model_internal var _usernameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _usernameIsValidCacheInitialized:Boolean = false;
    model_internal var _usernameValidationFailureMessages:Array;
    
    model_internal var _locationidIsValid:Boolean;
    model_internal var _locationidValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _locationidIsValidCacheInitialized:Boolean = false;
    model_internal var _locationidValidationFailureMessages:Array;
    
    model_internal var _orgnameIsValid:Boolean;
    model_internal var _orgnameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _orgnameIsValidCacheInitialized:Boolean = false;
    model_internal var _orgnameValidationFailureMessages:Array;
    
    model_internal var _descriptionIsValid:Boolean;
    model_internal var _descriptionValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _descriptionIsValidCacheInitialized:Boolean = false;
    model_internal var _descriptionValidationFailureMessages:Array;
    
    model_internal var _client_idIsValid:Boolean;
    model_internal var _client_idValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _client_idIsValidCacheInitialized:Boolean = false;
    model_internal var _client_idValidationFailureMessages:Array;
    
    model_internal var _user_typeIsValid:Boolean;
    model_internal var _user_typeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _user_typeIsValidCacheInitialized:Boolean = false;
    model_internal var _user_typeValidationFailureMessages:Array;
    
    model_internal var _firstnameIsValid:Boolean;
    model_internal var _firstnameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _firstnameIsValidCacheInitialized:Boolean = false;
    model_internal var _firstnameValidationFailureMessages:Array;
    
    model_internal var _countryIsValid:Boolean;
    model_internal var _countryValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _countryIsValidCacheInitialized:Boolean = false;
    model_internal var _countryValidationFailureMessages:Array;
    
    model_internal var _contactnameIsValid:Boolean;
    model_internal var _contactnameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _contactnameIsValidCacheInitialized:Boolean = false;
    model_internal var _contactnameValidationFailureMessages:Array;
    
    model_internal var _dbnameIsValid:Boolean;
    model_internal var _dbnameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _dbnameIsValidCacheInitialized:Boolean = false;
    model_internal var _dbnameValidationFailureMessages:Array;
    
    model_internal var _activeIsValid:Boolean;
    model_internal var _activeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _activeIsValidCacheInitialized:Boolean = false;
    model_internal var _activeValidationFailureMessages:Array;

    model_internal var _instance:_Super_VOUserMaster;
    model_internal static var _nullStyle:com.adobe.fiber.styles.Style = new com.adobe.fiber.styles.Style();

    public function _VOUserMasterEntityMetadata(value : _Super_VOUserMaster)
    {
        // initialize property maps
        if (model_internal::dependentsOnMap == null)
        {
            // depenents map
            model_internal::dependentsOnMap = new Object();
            model_internal::dependentsOnMap["contactaddress1"] = new Array();
            model_internal::dependentsOnMap["contactaddress2"] = new Array();
            model_internal::dependentsOnMap["address1"] = new Array();
            model_internal::dependentsOnMap["lastname"] = new Array();
            model_internal::dependentsOnMap["address2"] = new Array();
            model_internal::dependentsOnMap["password"] = new Array();
            model_internal::dependentsOnMap["p_code"] = new Array();
            model_internal::dependentsOnMap["city"] = new Array();
            model_internal::dependentsOnMap["title"] = new Array();
            model_internal::dependentsOnMap["username"] = new Array();
            model_internal::dependentsOnMap["faxno"] = new Array();
            model_internal::dependentsOnMap["locationid"] = new Array();
            model_internal::dependentsOnMap["orgname"] = new Array();
            model_internal::dependentsOnMap["description"] = new Array();
            model_internal::dependentsOnMap["client_id"] = new Array();
            model_internal::dependentsOnMap["user_type"] = new Array();
            model_internal::dependentsOnMap["contactno_1"] = new Array();
            model_internal::dependentsOnMap["firstname"] = new Array();
            model_internal::dependentsOnMap["contactno_2"] = new Array();
            model_internal::dependentsOnMap["country"] = new Array();
            model_internal::dependentsOnMap["ext1"] = new Array();
            model_internal::dependentsOnMap["contactname"] = new Array();
            model_internal::dependentsOnMap["ext2"] = new Array();
            model_internal::dependentsOnMap["dbname"] = new Array();
            model_internal::dependentsOnMap["active"] = new Array();

            // collection base map
            model_internal::collectionBaseMap = new Object()
        }

        model_internal::_instance = value;
        model_internal::_contactaddress1Validator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForContactaddress1);
        model_internal::_contactaddress1Validator.required = true;
        model_internal::_contactaddress1Validator.requiredFieldError = "contactaddress1 is required";
        //model_internal::_contactaddress1Validator.source = model_internal::_instance;
        //model_internal::_contactaddress1Validator.property = "contactaddress1";
        model_internal::_contactaddress2Validator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForContactaddress2);
        model_internal::_contactaddress2Validator.required = true;
        model_internal::_contactaddress2Validator.requiredFieldError = "contactaddress2 is required";
        //model_internal::_contactaddress2Validator.source = model_internal::_instance;
        //model_internal::_contactaddress2Validator.property = "contactaddress2";
        model_internal::_address1Validator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForAddress1);
        model_internal::_address1Validator.required = true;
        model_internal::_address1Validator.requiredFieldError = "address1 is required";
        //model_internal::_address1Validator.source = model_internal::_instance;
        //model_internal::_address1Validator.property = "address1";
        model_internal::_lastnameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForLastname);
        model_internal::_lastnameValidator.required = true;
        model_internal::_lastnameValidator.requiredFieldError = "lastname is required";
        //model_internal::_lastnameValidator.source = model_internal::_instance;
        //model_internal::_lastnameValidator.property = "lastname";
        model_internal::_address2Validator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForAddress2);
        model_internal::_address2Validator.required = true;
        model_internal::_address2Validator.requiredFieldError = "address2 is required";
        //model_internal::_address2Validator.source = model_internal::_instance;
        //model_internal::_address2Validator.property = "address2";
        model_internal::_passwordValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPassword);
        model_internal::_passwordValidator.required = true;
        model_internal::_passwordValidator.requiredFieldError = "password is required";
        //model_internal::_passwordValidator.source = model_internal::_instance;
        //model_internal::_passwordValidator.property = "password";
        model_internal::_p_codeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForP_code);
        model_internal::_p_codeValidator.required = true;
        model_internal::_p_codeValidator.requiredFieldError = "p_code is required";
        //model_internal::_p_codeValidator.source = model_internal::_instance;
        //model_internal::_p_codeValidator.property = "p_code";
        model_internal::_cityValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCity);
        model_internal::_cityValidator.required = true;
        model_internal::_cityValidator.requiredFieldError = "city is required";
        //model_internal::_cityValidator.source = model_internal::_instance;
        //model_internal::_cityValidator.property = "city";
        model_internal::_titleValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForTitle);
        model_internal::_titleValidator.required = true;
        model_internal::_titleValidator.requiredFieldError = "title is required";
        //model_internal::_titleValidator.source = model_internal::_instance;
        //model_internal::_titleValidator.property = "title";
        model_internal::_usernameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForUsername);
        model_internal::_usernameValidator.required = true;
        model_internal::_usernameValidator.requiredFieldError = "username is required";
        //model_internal::_usernameValidator.source = model_internal::_instance;
        //model_internal::_usernameValidator.property = "username";
        model_internal::_locationidValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForLocationid);
        model_internal::_locationidValidator.required = true;
        model_internal::_locationidValidator.requiredFieldError = "locationid is required";
        //model_internal::_locationidValidator.source = model_internal::_instance;
        //model_internal::_locationidValidator.property = "locationid";
        model_internal::_orgnameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForOrgname);
        model_internal::_orgnameValidator.required = true;
        model_internal::_orgnameValidator.requiredFieldError = "orgname is required";
        //model_internal::_orgnameValidator.source = model_internal::_instance;
        //model_internal::_orgnameValidator.property = "orgname";
        model_internal::_descriptionValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDescription);
        model_internal::_descriptionValidator.required = true;
        model_internal::_descriptionValidator.requiredFieldError = "description is required";
        //model_internal::_descriptionValidator.source = model_internal::_instance;
        //model_internal::_descriptionValidator.property = "description";
        model_internal::_client_idValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForClient_id);
        model_internal::_client_idValidator.required = true;
        model_internal::_client_idValidator.requiredFieldError = "client_id is required";
        //model_internal::_client_idValidator.source = model_internal::_instance;
        //model_internal::_client_idValidator.property = "client_id";
        model_internal::_user_typeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForUser_type);
        model_internal::_user_typeValidator.required = true;
        model_internal::_user_typeValidator.requiredFieldError = "user_type is required";
        //model_internal::_user_typeValidator.source = model_internal::_instance;
        //model_internal::_user_typeValidator.property = "user_type";
        model_internal::_firstnameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForFirstname);
        model_internal::_firstnameValidator.required = true;
        model_internal::_firstnameValidator.requiredFieldError = "firstname is required";
        //model_internal::_firstnameValidator.source = model_internal::_instance;
        //model_internal::_firstnameValidator.property = "firstname";
        model_internal::_countryValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCountry);
        model_internal::_countryValidator.required = true;
        model_internal::_countryValidator.requiredFieldError = "country is required";
        //model_internal::_countryValidator.source = model_internal::_instance;
        //model_internal::_countryValidator.property = "country";
        model_internal::_contactnameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForContactname);
        model_internal::_contactnameValidator.required = true;
        model_internal::_contactnameValidator.requiredFieldError = "contactname is required";
        //model_internal::_contactnameValidator.source = model_internal::_instance;
        //model_internal::_contactnameValidator.property = "contactname";
        model_internal::_dbnameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDbname);
        model_internal::_dbnameValidator.required = true;
        model_internal::_dbnameValidator.requiredFieldError = "dbname is required";
        //model_internal::_dbnameValidator.source = model_internal::_instance;
        //model_internal::_dbnameValidator.property = "dbname";
        model_internal::_activeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForActive);
        model_internal::_activeValidator.required = true;
        model_internal::_activeValidator.requiredFieldError = "active is required";
        //model_internal::_activeValidator.source = model_internal::_instance;
        //model_internal::_activeValidator.property = "active";
    }

    override public function getEntityName():String
    {
        return model_internal::entityName;
    }

    override public function getProperties():Array
    {
        return model_internal::allProperties;
    }

    override public function getAssociationProperties():Array
    {
        return model_internal::allAssociationProperties;
    }

    override public function getRequiredProperties():Array
    {
         return model_internal::allRequiredProperties;   
    }

    override public function getDataProperties():Array
    {
        return model_internal::dataProperties;
    }

    override public function getGuardedProperties():Array
    {
        return model_internal::guardedProperties;
    }

    override public function getUnguardedProperties():Array
    {
        return model_internal::allAlwaysAvailableProperties;
    }

    override public function getDependants(propertyName:String):Array
    {
       if (model_internal::dataProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a data property of entity VOUserMaster");  
            
       return model_internal::dependentsOnMap[propertyName] as Array;  
    }

    override public function getDependedOnServices():Array
    {
        return model_internal::dependedOnServices;
    }

    override public function getCollectionProperties():Array
    {
        return model_internal::collectionProperties;
    }

    override public function getCollectionBase(propertyName:String):String
    {
        if (model_internal::collectionProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a collection property of entity VOUserMaster");  

        return model_internal::collectionBaseMap[propertyName];
    }

    override public function getAvailableProperties():com.adobe.fiber.valueobjects.IPropertyIterator
    {
        return new com.adobe.fiber.valueobjects.AvailablePropertyIterator(this);
    }

    override public function getValue(propertyName:String):*
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity VOUserMaster");
        }

        return model_internal::_instance[propertyName];
    }

    override public function setValue(propertyName:String, value:*):void
    {
        if (model_internal::dataProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " is not a data property of entity VOUserMaster");
        }

        model_internal::_instance[propertyName] = value;
    }

    override public function getMappedByProperty(associationProperty:String):String
    {
        switch(associationProperty)
        {
            default:
            {
                return null;
            }
        }
    }

    override public function getPropertyLength(propertyName:String):int
    {
        switch(propertyName)
        {
            default:
            {
                return 0;
            }
        }
    }

    override public function isAvailable(propertyName:String):Boolean
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity VOUserMaster");
        }

        if (model_internal::allAlwaysAvailableProperties.indexOf(propertyName) != -1)
        {
            return true;
        }

        switch(propertyName)
        {
            default:
            {
                return true;
            }
        }
    }

    override public function getIdentityMap():Object
    {
        var returnMap:Object = new Object();

        return returnMap;
    }

    [Bindable(event="propertyChange")]
    override public function get invalidConstraints():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_invalidConstraints;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_invalidConstraints;        
        }
    }

    [Bindable(event="propertyChange")]
    override public function get validationFailureMessages():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
    }

    override public function getDependantInvalidConstraints(propertyName:String):Array
    {
        var dependants:Array = getDependants(propertyName);
        if (dependants.length == 0)
        {
            return emptyArray;
        }

        var currentlyInvalid:Array = invalidConstraints;
        if (currentlyInvalid.length == 0)
        {
            return emptyArray;
        }

        var filterFunc:Function = function(element:*, index:int, arr:Array):Boolean
        {
            return dependants.indexOf(element) > -1;
        }

        return currentlyInvalid.filter(filterFunc);
    }

    /**
     * isValid
     */
    [Bindable(event="propertyChange")] 
    public function get isValid() : Boolean
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_isValid;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_isValid;
        }
    }

    [Bindable(event="propertyChange")]
    public function get isContactaddress1Available():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isContactaddress2Available():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isAddress1Available():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isLastnameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isAddress2Available():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPasswordAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isP_codeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCityAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTitleAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUsernameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isFaxnoAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isLocationidAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isOrgnameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDescriptionAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isClient_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUser_typeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isContactno_1Available():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isFirstnameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isContactno_2Available():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCountryAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isExt1Available():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isContactnameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isExt2Available():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDbnameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isActiveAvailable():Boolean
    {
        return true;
    }


    /**
     * derived property recalculation
     */
    public function invalidateDependentOnContactaddress1():void
    {
        if (model_internal::_contactaddress1IsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfContactaddress1 = null;
            model_internal::calculateContactaddress1IsValid();
        }
    }
    public function invalidateDependentOnContactaddress2():void
    {
        if (model_internal::_contactaddress2IsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfContactaddress2 = null;
            model_internal::calculateContactaddress2IsValid();
        }
    }
    public function invalidateDependentOnAddress1():void
    {
        if (model_internal::_address1IsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfAddress1 = null;
            model_internal::calculateAddress1IsValid();
        }
    }
    public function invalidateDependentOnLastname():void
    {
        if (model_internal::_lastnameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfLastname = null;
            model_internal::calculateLastnameIsValid();
        }
    }
    public function invalidateDependentOnAddress2():void
    {
        if (model_internal::_address2IsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfAddress2 = null;
            model_internal::calculateAddress2IsValid();
        }
    }
    public function invalidateDependentOnPassword():void
    {
        if (model_internal::_passwordIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPassword = null;
            model_internal::calculatePasswordIsValid();
        }
    }
    public function invalidateDependentOnP_code():void
    {
        if (model_internal::_p_codeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfP_code = null;
            model_internal::calculateP_codeIsValid();
        }
    }
    public function invalidateDependentOnCity():void
    {
        if (model_internal::_cityIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCity = null;
            model_internal::calculateCityIsValid();
        }
    }
    public function invalidateDependentOnTitle():void
    {
        if (model_internal::_titleIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfTitle = null;
            model_internal::calculateTitleIsValid();
        }
    }
    public function invalidateDependentOnUsername():void
    {
        if (model_internal::_usernameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfUsername = null;
            model_internal::calculateUsernameIsValid();
        }
    }
    public function invalidateDependentOnLocationid():void
    {
        if (model_internal::_locationidIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfLocationid = null;
            model_internal::calculateLocationidIsValid();
        }
    }
    public function invalidateDependentOnOrgname():void
    {
        if (model_internal::_orgnameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfOrgname = null;
            model_internal::calculateOrgnameIsValid();
        }
    }
    public function invalidateDependentOnDescription():void
    {
        if (model_internal::_descriptionIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDescription = null;
            model_internal::calculateDescriptionIsValid();
        }
    }
    public function invalidateDependentOnClient_id():void
    {
        if (model_internal::_client_idIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfClient_id = null;
            model_internal::calculateClient_idIsValid();
        }
    }
    public function invalidateDependentOnUser_type():void
    {
        if (model_internal::_user_typeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfUser_type = null;
            model_internal::calculateUser_typeIsValid();
        }
    }
    public function invalidateDependentOnFirstname():void
    {
        if (model_internal::_firstnameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfFirstname = null;
            model_internal::calculateFirstnameIsValid();
        }
    }
    public function invalidateDependentOnCountry():void
    {
        if (model_internal::_countryIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCountry = null;
            model_internal::calculateCountryIsValid();
        }
    }
    public function invalidateDependentOnContactname():void
    {
        if (model_internal::_contactnameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfContactname = null;
            model_internal::calculateContactnameIsValid();
        }
    }
    public function invalidateDependentOnDbname():void
    {
        if (model_internal::_dbnameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDbname = null;
            model_internal::calculateDbnameIsValid();
        }
    }
    public function invalidateDependentOnActive():void
    {
        if (model_internal::_activeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfActive = null;
            model_internal::calculateActiveIsValid();
        }
    }

    model_internal function fireChangeEvent(propertyName:String, oldValue:Object, newValue:Object):void
    {
        this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, propertyName, oldValue, newValue));
    }

    [Bindable(event="propertyChange")]   
    public function get contactaddress1Style():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get contactaddress1Validator() : StyleValidator
    {
        return model_internal::_contactaddress1Validator;
    }

    model_internal function set _contactaddress1IsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_contactaddress1IsValid;         
        if (oldValue !== value)
        {
            model_internal::_contactaddress1IsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "contactaddress1IsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get contactaddress1IsValid():Boolean
    {
        if (!model_internal::_contactaddress1IsValidCacheInitialized)
        {
            model_internal::calculateContactaddress1IsValid();
        }

        return model_internal::_contactaddress1IsValid;
    }

    model_internal function calculateContactaddress1IsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_contactaddress1Validator.validate(model_internal::_instance.contactaddress1)
        model_internal::_contactaddress1IsValid_der = (valRes.results == null);
        model_internal::_contactaddress1IsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::contactaddress1ValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::contactaddress1ValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get contactaddress1ValidationFailureMessages():Array
    {
        if (model_internal::_contactaddress1ValidationFailureMessages == null)
            model_internal::calculateContactaddress1IsValid();

        return _contactaddress1ValidationFailureMessages;
    }

    model_internal function set contactaddress1ValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_contactaddress1ValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_contactaddress1ValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "contactaddress1ValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get contactaddress2Style():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get contactaddress2Validator() : StyleValidator
    {
        return model_internal::_contactaddress2Validator;
    }

    model_internal function set _contactaddress2IsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_contactaddress2IsValid;         
        if (oldValue !== value)
        {
            model_internal::_contactaddress2IsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "contactaddress2IsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get contactaddress2IsValid():Boolean
    {
        if (!model_internal::_contactaddress2IsValidCacheInitialized)
        {
            model_internal::calculateContactaddress2IsValid();
        }

        return model_internal::_contactaddress2IsValid;
    }

    model_internal function calculateContactaddress2IsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_contactaddress2Validator.validate(model_internal::_instance.contactaddress2)
        model_internal::_contactaddress2IsValid_der = (valRes.results == null);
        model_internal::_contactaddress2IsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::contactaddress2ValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::contactaddress2ValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get contactaddress2ValidationFailureMessages():Array
    {
        if (model_internal::_contactaddress2ValidationFailureMessages == null)
            model_internal::calculateContactaddress2IsValid();

        return _contactaddress2ValidationFailureMessages;
    }

    model_internal function set contactaddress2ValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_contactaddress2ValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_contactaddress2ValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "contactaddress2ValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get address1Style():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get address1Validator() : StyleValidator
    {
        return model_internal::_address1Validator;
    }

    model_internal function set _address1IsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_address1IsValid;         
        if (oldValue !== value)
        {
            model_internal::_address1IsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "address1IsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get address1IsValid():Boolean
    {
        if (!model_internal::_address1IsValidCacheInitialized)
        {
            model_internal::calculateAddress1IsValid();
        }

        return model_internal::_address1IsValid;
    }

    model_internal function calculateAddress1IsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_address1Validator.validate(model_internal::_instance.address1)
        model_internal::_address1IsValid_der = (valRes.results == null);
        model_internal::_address1IsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::address1ValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::address1ValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get address1ValidationFailureMessages():Array
    {
        if (model_internal::_address1ValidationFailureMessages == null)
            model_internal::calculateAddress1IsValid();

        return _address1ValidationFailureMessages;
    }

    model_internal function set address1ValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_address1ValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_address1ValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "address1ValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get lastnameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get lastnameValidator() : StyleValidator
    {
        return model_internal::_lastnameValidator;
    }

    model_internal function set _lastnameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_lastnameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_lastnameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "lastnameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get lastnameIsValid():Boolean
    {
        if (!model_internal::_lastnameIsValidCacheInitialized)
        {
            model_internal::calculateLastnameIsValid();
        }

        return model_internal::_lastnameIsValid;
    }

    model_internal function calculateLastnameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_lastnameValidator.validate(model_internal::_instance.lastname)
        model_internal::_lastnameIsValid_der = (valRes.results == null);
        model_internal::_lastnameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::lastnameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::lastnameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get lastnameValidationFailureMessages():Array
    {
        if (model_internal::_lastnameValidationFailureMessages == null)
            model_internal::calculateLastnameIsValid();

        return _lastnameValidationFailureMessages;
    }

    model_internal function set lastnameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_lastnameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_lastnameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "lastnameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get address2Style():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get address2Validator() : StyleValidator
    {
        return model_internal::_address2Validator;
    }

    model_internal function set _address2IsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_address2IsValid;         
        if (oldValue !== value)
        {
            model_internal::_address2IsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "address2IsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get address2IsValid():Boolean
    {
        if (!model_internal::_address2IsValidCacheInitialized)
        {
            model_internal::calculateAddress2IsValid();
        }

        return model_internal::_address2IsValid;
    }

    model_internal function calculateAddress2IsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_address2Validator.validate(model_internal::_instance.address2)
        model_internal::_address2IsValid_der = (valRes.results == null);
        model_internal::_address2IsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::address2ValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::address2ValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get address2ValidationFailureMessages():Array
    {
        if (model_internal::_address2ValidationFailureMessages == null)
            model_internal::calculateAddress2IsValid();

        return _address2ValidationFailureMessages;
    }

    model_internal function set address2ValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_address2ValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_address2ValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "address2ValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get passwordStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get passwordValidator() : StyleValidator
    {
        return model_internal::_passwordValidator;
    }

    model_internal function set _passwordIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_passwordIsValid;         
        if (oldValue !== value)
        {
            model_internal::_passwordIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "passwordIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get passwordIsValid():Boolean
    {
        if (!model_internal::_passwordIsValidCacheInitialized)
        {
            model_internal::calculatePasswordIsValid();
        }

        return model_internal::_passwordIsValid;
    }

    model_internal function calculatePasswordIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_passwordValidator.validate(model_internal::_instance.password)
        model_internal::_passwordIsValid_der = (valRes.results == null);
        model_internal::_passwordIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::passwordValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::passwordValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get passwordValidationFailureMessages():Array
    {
        if (model_internal::_passwordValidationFailureMessages == null)
            model_internal::calculatePasswordIsValid();

        return _passwordValidationFailureMessages;
    }

    model_internal function set passwordValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_passwordValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_passwordValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "passwordValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get p_codeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get p_codeValidator() : StyleValidator
    {
        return model_internal::_p_codeValidator;
    }

    model_internal function set _p_codeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_p_codeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_p_codeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "p_codeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get p_codeIsValid():Boolean
    {
        if (!model_internal::_p_codeIsValidCacheInitialized)
        {
            model_internal::calculateP_codeIsValid();
        }

        return model_internal::_p_codeIsValid;
    }

    model_internal function calculateP_codeIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_p_codeValidator.validate(model_internal::_instance.p_code)
        model_internal::_p_codeIsValid_der = (valRes.results == null);
        model_internal::_p_codeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::p_codeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::p_codeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get p_codeValidationFailureMessages():Array
    {
        if (model_internal::_p_codeValidationFailureMessages == null)
            model_internal::calculateP_codeIsValid();

        return _p_codeValidationFailureMessages;
    }

    model_internal function set p_codeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_p_codeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_p_codeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "p_codeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get cityStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get cityValidator() : StyleValidator
    {
        return model_internal::_cityValidator;
    }

    model_internal function set _cityIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_cityIsValid;         
        if (oldValue !== value)
        {
            model_internal::_cityIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cityIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get cityIsValid():Boolean
    {
        if (!model_internal::_cityIsValidCacheInitialized)
        {
            model_internal::calculateCityIsValid();
        }

        return model_internal::_cityIsValid;
    }

    model_internal function calculateCityIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_cityValidator.validate(model_internal::_instance.city)
        model_internal::_cityIsValid_der = (valRes.results == null);
        model_internal::_cityIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::cityValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::cityValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get cityValidationFailureMessages():Array
    {
        if (model_internal::_cityValidationFailureMessages == null)
            model_internal::calculateCityIsValid();

        return _cityValidationFailureMessages;
    }

    model_internal function set cityValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_cityValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_cityValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cityValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get titleStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get titleValidator() : StyleValidator
    {
        return model_internal::_titleValidator;
    }

    model_internal function set _titleIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_titleIsValid;         
        if (oldValue !== value)
        {
            model_internal::_titleIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "titleIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get titleIsValid():Boolean
    {
        if (!model_internal::_titleIsValidCacheInitialized)
        {
            model_internal::calculateTitleIsValid();
        }

        return model_internal::_titleIsValid;
    }

    model_internal function calculateTitleIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_titleValidator.validate(model_internal::_instance.title)
        model_internal::_titleIsValid_der = (valRes.results == null);
        model_internal::_titleIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::titleValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::titleValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get titleValidationFailureMessages():Array
    {
        if (model_internal::_titleValidationFailureMessages == null)
            model_internal::calculateTitleIsValid();

        return _titleValidationFailureMessages;
    }

    model_internal function set titleValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_titleValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_titleValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "titleValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get usernameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get usernameValidator() : StyleValidator
    {
        return model_internal::_usernameValidator;
    }

    model_internal function set _usernameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_usernameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_usernameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "usernameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get usernameIsValid():Boolean
    {
        if (!model_internal::_usernameIsValidCacheInitialized)
        {
            model_internal::calculateUsernameIsValid();
        }

        return model_internal::_usernameIsValid;
    }

    model_internal function calculateUsernameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_usernameValidator.validate(model_internal::_instance.username)
        model_internal::_usernameIsValid_der = (valRes.results == null);
        model_internal::_usernameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::usernameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::usernameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get usernameValidationFailureMessages():Array
    {
        if (model_internal::_usernameValidationFailureMessages == null)
            model_internal::calculateUsernameIsValid();

        return _usernameValidationFailureMessages;
    }

    model_internal function set usernameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_usernameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_usernameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "usernameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get faxnoStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get locationidStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get locationidValidator() : StyleValidator
    {
        return model_internal::_locationidValidator;
    }

    model_internal function set _locationidIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_locationidIsValid;         
        if (oldValue !== value)
        {
            model_internal::_locationidIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "locationidIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get locationidIsValid():Boolean
    {
        if (!model_internal::_locationidIsValidCacheInitialized)
        {
            model_internal::calculateLocationidIsValid();
        }

        return model_internal::_locationidIsValid;
    }

    model_internal function calculateLocationidIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_locationidValidator.validate(model_internal::_instance.locationid)
        model_internal::_locationidIsValid_der = (valRes.results == null);
        model_internal::_locationidIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::locationidValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::locationidValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get locationidValidationFailureMessages():Array
    {
        if (model_internal::_locationidValidationFailureMessages == null)
            model_internal::calculateLocationidIsValid();

        return _locationidValidationFailureMessages;
    }

    model_internal function set locationidValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_locationidValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_locationidValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "locationidValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get orgnameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get orgnameValidator() : StyleValidator
    {
        return model_internal::_orgnameValidator;
    }

    model_internal function set _orgnameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_orgnameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_orgnameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "orgnameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get orgnameIsValid():Boolean
    {
        if (!model_internal::_orgnameIsValidCacheInitialized)
        {
            model_internal::calculateOrgnameIsValid();
        }

        return model_internal::_orgnameIsValid;
    }

    model_internal function calculateOrgnameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_orgnameValidator.validate(model_internal::_instance.orgname)
        model_internal::_orgnameIsValid_der = (valRes.results == null);
        model_internal::_orgnameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::orgnameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::orgnameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get orgnameValidationFailureMessages():Array
    {
        if (model_internal::_orgnameValidationFailureMessages == null)
            model_internal::calculateOrgnameIsValid();

        return _orgnameValidationFailureMessages;
    }

    model_internal function set orgnameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_orgnameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_orgnameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "orgnameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get descriptionStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get descriptionValidator() : StyleValidator
    {
        return model_internal::_descriptionValidator;
    }

    model_internal function set _descriptionIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_descriptionIsValid;         
        if (oldValue !== value)
        {
            model_internal::_descriptionIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "descriptionIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get descriptionIsValid():Boolean
    {
        if (!model_internal::_descriptionIsValidCacheInitialized)
        {
            model_internal::calculateDescriptionIsValid();
        }

        return model_internal::_descriptionIsValid;
    }

    model_internal function calculateDescriptionIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_descriptionValidator.validate(model_internal::_instance.description)
        model_internal::_descriptionIsValid_der = (valRes.results == null);
        model_internal::_descriptionIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::descriptionValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::descriptionValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get descriptionValidationFailureMessages():Array
    {
        if (model_internal::_descriptionValidationFailureMessages == null)
            model_internal::calculateDescriptionIsValid();

        return _descriptionValidationFailureMessages;
    }

    model_internal function set descriptionValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_descriptionValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_descriptionValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "descriptionValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get client_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get client_idValidator() : StyleValidator
    {
        return model_internal::_client_idValidator;
    }

    model_internal function set _client_idIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_client_idIsValid;         
        if (oldValue !== value)
        {
            model_internal::_client_idIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "client_idIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get client_idIsValid():Boolean
    {
        if (!model_internal::_client_idIsValidCacheInitialized)
        {
            model_internal::calculateClient_idIsValid();
        }

        return model_internal::_client_idIsValid;
    }

    model_internal function calculateClient_idIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_client_idValidator.validate(model_internal::_instance.client_id)
        model_internal::_client_idIsValid_der = (valRes.results == null);
        model_internal::_client_idIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::client_idValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::client_idValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get client_idValidationFailureMessages():Array
    {
        if (model_internal::_client_idValidationFailureMessages == null)
            model_internal::calculateClient_idIsValid();

        return _client_idValidationFailureMessages;
    }

    model_internal function set client_idValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_client_idValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_client_idValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "client_idValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get user_typeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get user_typeValidator() : StyleValidator
    {
        return model_internal::_user_typeValidator;
    }

    model_internal function set _user_typeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_user_typeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_user_typeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_typeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get user_typeIsValid():Boolean
    {
        if (!model_internal::_user_typeIsValidCacheInitialized)
        {
            model_internal::calculateUser_typeIsValid();
        }

        return model_internal::_user_typeIsValid;
    }

    model_internal function calculateUser_typeIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_user_typeValidator.validate(model_internal::_instance.user_type)
        model_internal::_user_typeIsValid_der = (valRes.results == null);
        model_internal::_user_typeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::user_typeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::user_typeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get user_typeValidationFailureMessages():Array
    {
        if (model_internal::_user_typeValidationFailureMessages == null)
            model_internal::calculateUser_typeIsValid();

        return _user_typeValidationFailureMessages;
    }

    model_internal function set user_typeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_user_typeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_user_typeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_typeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get contactno_1Style():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get firstnameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get firstnameValidator() : StyleValidator
    {
        return model_internal::_firstnameValidator;
    }

    model_internal function set _firstnameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_firstnameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_firstnameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "firstnameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get firstnameIsValid():Boolean
    {
        if (!model_internal::_firstnameIsValidCacheInitialized)
        {
            model_internal::calculateFirstnameIsValid();
        }

        return model_internal::_firstnameIsValid;
    }

    model_internal function calculateFirstnameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_firstnameValidator.validate(model_internal::_instance.firstname)
        model_internal::_firstnameIsValid_der = (valRes.results == null);
        model_internal::_firstnameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::firstnameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::firstnameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get firstnameValidationFailureMessages():Array
    {
        if (model_internal::_firstnameValidationFailureMessages == null)
            model_internal::calculateFirstnameIsValid();

        return _firstnameValidationFailureMessages;
    }

    model_internal function set firstnameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_firstnameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_firstnameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "firstnameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get contactno_2Style():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get countryStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get countryValidator() : StyleValidator
    {
        return model_internal::_countryValidator;
    }

    model_internal function set _countryIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_countryIsValid;         
        if (oldValue !== value)
        {
            model_internal::_countryIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "countryIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get countryIsValid():Boolean
    {
        if (!model_internal::_countryIsValidCacheInitialized)
        {
            model_internal::calculateCountryIsValid();
        }

        return model_internal::_countryIsValid;
    }

    model_internal function calculateCountryIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_countryValidator.validate(model_internal::_instance.country)
        model_internal::_countryIsValid_der = (valRes.results == null);
        model_internal::_countryIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::countryValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::countryValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get countryValidationFailureMessages():Array
    {
        if (model_internal::_countryValidationFailureMessages == null)
            model_internal::calculateCountryIsValid();

        return _countryValidationFailureMessages;
    }

    model_internal function set countryValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_countryValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_countryValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "countryValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get ext1Style():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get contactnameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get contactnameValidator() : StyleValidator
    {
        return model_internal::_contactnameValidator;
    }

    model_internal function set _contactnameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_contactnameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_contactnameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "contactnameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get contactnameIsValid():Boolean
    {
        if (!model_internal::_contactnameIsValidCacheInitialized)
        {
            model_internal::calculateContactnameIsValid();
        }

        return model_internal::_contactnameIsValid;
    }

    model_internal function calculateContactnameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_contactnameValidator.validate(model_internal::_instance.contactname)
        model_internal::_contactnameIsValid_der = (valRes.results == null);
        model_internal::_contactnameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::contactnameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::contactnameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get contactnameValidationFailureMessages():Array
    {
        if (model_internal::_contactnameValidationFailureMessages == null)
            model_internal::calculateContactnameIsValid();

        return _contactnameValidationFailureMessages;
    }

    model_internal function set contactnameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_contactnameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_contactnameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "contactnameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get ext2Style():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get dbnameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get dbnameValidator() : StyleValidator
    {
        return model_internal::_dbnameValidator;
    }

    model_internal function set _dbnameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_dbnameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_dbnameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "dbnameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get dbnameIsValid():Boolean
    {
        if (!model_internal::_dbnameIsValidCacheInitialized)
        {
            model_internal::calculateDbnameIsValid();
        }

        return model_internal::_dbnameIsValid;
    }

    model_internal function calculateDbnameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_dbnameValidator.validate(model_internal::_instance.dbname)
        model_internal::_dbnameIsValid_der = (valRes.results == null);
        model_internal::_dbnameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::dbnameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::dbnameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get dbnameValidationFailureMessages():Array
    {
        if (model_internal::_dbnameValidationFailureMessages == null)
            model_internal::calculateDbnameIsValid();

        return _dbnameValidationFailureMessages;
    }

    model_internal function set dbnameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_dbnameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_dbnameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "dbnameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get activeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get activeValidator() : StyleValidator
    {
        return model_internal::_activeValidator;
    }

    model_internal function set _activeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_activeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_activeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "activeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get activeIsValid():Boolean
    {
        if (!model_internal::_activeIsValidCacheInitialized)
        {
            model_internal::calculateActiveIsValid();
        }

        return model_internal::_activeIsValid;
    }

    model_internal function calculateActiveIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_activeValidator.validate(model_internal::_instance.active)
        model_internal::_activeIsValid_der = (valRes.results == null);
        model_internal::_activeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::activeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::activeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get activeValidationFailureMessages():Array
    {
        if (model_internal::_activeValidationFailureMessages == null)
            model_internal::calculateActiveIsValid();

        return _activeValidationFailureMessages;
    }

    model_internal function set activeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_activeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_activeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "activeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }


     /**
     * 
     * @inheritDoc 
     */ 
     override public function getStyle(propertyName:String):com.adobe.fiber.styles.IStyle
     {
         switch(propertyName)
         {
            default:
            {
                return null;
            }
         }
     }
     
     /**
     * 
     * @inheritDoc 
     *  
     */  
     override public function getPropertyValidationFailureMessages(propertyName:String):Array
     {
         switch(propertyName)
         {
            case("contactaddress1"):
            {
                return contactaddress1ValidationFailureMessages;
            }
            case("contactaddress2"):
            {
                return contactaddress2ValidationFailureMessages;
            }
            case("address1"):
            {
                return address1ValidationFailureMessages;
            }
            case("lastname"):
            {
                return lastnameValidationFailureMessages;
            }
            case("address2"):
            {
                return address2ValidationFailureMessages;
            }
            case("password"):
            {
                return passwordValidationFailureMessages;
            }
            case("p_code"):
            {
                return p_codeValidationFailureMessages;
            }
            case("city"):
            {
                return cityValidationFailureMessages;
            }
            case("title"):
            {
                return titleValidationFailureMessages;
            }
            case("username"):
            {
                return usernameValidationFailureMessages;
            }
            case("locationid"):
            {
                return locationidValidationFailureMessages;
            }
            case("orgname"):
            {
                return orgnameValidationFailureMessages;
            }
            case("description"):
            {
                return descriptionValidationFailureMessages;
            }
            case("client_id"):
            {
                return client_idValidationFailureMessages;
            }
            case("user_type"):
            {
                return user_typeValidationFailureMessages;
            }
            case("firstname"):
            {
                return firstnameValidationFailureMessages;
            }
            case("country"):
            {
                return countryValidationFailureMessages;
            }
            case("contactname"):
            {
                return contactnameValidationFailureMessages;
            }
            case("dbname"):
            {
                return dbnameValidationFailureMessages;
            }
            case("active"):
            {
                return activeValidationFailureMessages;
            }
            default:
            {
                return emptyArray;
            }
         }
     }

}

}
